<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h3 align="center" > <a href="#">添加图书</a> </h3>
	<form align="center">
		<input type="text" name="title">
		<input type="submit" value="搜索">
	</form>
	<table align="center" border="1" width="300px">
		<tr>
			<td>编号</td>
			<td>标题</td>
			<td>作者</td>
			<td>操作</td>
		</tr>
        {% for i in pagex %}
		<tr>
			<td>{{ i.id }}</td>
			<td>{{ i.title }}</td>
			<td>{{ i.author }}</td>
			<td> <a href="{% url 'book_del' i.id %}">删除</a> </td>
		</tr>
        {% endfor %}
		<tr>
			<td colspan="4" align="center">
			{% if pagex.number > 1 %}
                <a href="{% url 'index' %}?page={{ pagex.number|add:-1 }}&title={{ title }}">上一页</a>
            {% endif %}
&nbsp;&nbsp;            <b>当前页{{ pagex.number }}
            {% if hasnext %}
                </b> &nbsp;&nbsp;<a href="{% url 'index' %}?page={{ pagex.number|add:1 }}&title={{ title }}">下一页</a>
            {% endif %}
			</td>
		</tr>
	</table>
</body>
</html>